package soccerBet.project.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * Display utilities 
 */
public final class Display {

	// Prevent instantiation
	private Display() {
	}


	// Print some data to the output, appending a carriage return.
	public static void println(String value) {
		
		println(value,false); 
	}
	

	
	// Print some data to the output, appending a carriage return.
	public static void println(String value,boolean dayMonth) {
		
		DateFormat dM = new SimpleDateFormat("dd/MM");
		DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
		
		Date date = new Date();
		
		if(dayMonth)
			System.out.println("["+dateFormat.format(date)+" - "+dM.format(date)+"] "+value +"\n");
		else
			System.out.println("["+dateFormat.format(date)+"] "+value +"\n");
		
		System.out.flush();
	}
	
}
